from typing import List
from packages.engine.candidate_handler import CandidateHandler
from packages.engine.model.task_model import TaskModel


class FlowCandidateHandler(CandidateHandler):
    __sort__ = 100

    def handle(self, model: TaskModel) -> List[dict]:
        """
        候选人自定义处理类
        """
        res: List[dict] = []
        for i in range(1, 3):
            res.append({"userId": f"{i}", "userName": f"admin{i}"})
        return res


class FlowCandidateHandler2(CandidateHandler):
    __sort__ = 20

    def handle(self, model: TaskModel) -> List[dict]:
        """
        候选人自定义处理类2
        """
        res: List[dict] = []
        for i in range(2, 6):
            res.append({"userId": f"{i}", "userName": f"admin{i}"})
        return res
